What is Call by Value?
In call by value, a copy of the actual argument is passed to the function, and changes made to the parameter inside the function do not affect the original argument in the calling function.
Example of Call by Value
#include < stdio.h>
void increment(int x) {
x = x + 1;
printf("Inside increment: %d\n", x);
}
int main() {
int num = 5;
increment(num);
printf("After increment: %d\n", num);
return 0;
}